package com.sc.admin.service;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 *@Author shen chen
 *@Date 2024-12-04
 */
@Service
@RequiredArgsConstructor
public class CommonService {

    /**
     * 获取唯一码
     * @return 唯一码 如：1867023464447979521
     */
    public String generateUniqueCode() {
        long id = IdWorker.getId();
        return String.valueOf(id);
    }
}
